# -*- coding: utf-8 -*-
"""
Created on Thu Sep 15 21:05:31 2022

@author: Runx

Function: calculate the rainfall volume in the roi.

"""

import numpy as np 
#import pandas as pd
#import matplotlib.pyplot as plt
import settings
import Stochastic_Rainfall_v3 as sr
import storm_gen_ti_v3 as sg
import taichi as ti

roi = settings.roi
storm_m = settings.ls/settings.resolution
storm_n = settings.ws/settings.resolution
dt = settings.dt # unit min
theta = 30 # direction of envelope motivation


def translate(roi, x_offset, y_offset):
    for i in roi:
        for j in i:
            j[0] += x_offset
            j[1] += round(y_offset/2)
    return

def rotate(theta):
    '''
    Rotate the region of intest
    '''
    return

if __name__=="__main__":
    dur = int(sr.duration_gen()*60/dt)
    vel = sr.velocity_gen()
    
    
    
